ifneq ($(findstring 64,$(ARCH)),)
TCx						?= TC64
endif
TCx						?= TC32
TCMODE					?= OS

# releases:
#   https://releases.linaro.org/components/toolchain/binaries
# snapshots:
#   https://snapshots.linaro.org/gnu-toolchain
# Previous snapshots and release-candidates:
#   https://snapshots.linaro.org/components/toolchain/binaries
# https://snapshots.linaro.org/gnu-toolchain/11.3-2022.06-1/arm-linux-gnueabihf/gcc-linaro-11.3.1-2022.06-x86_64_arm-linux-gnueabihf.tar.xz
# https://snapshots.linaro.org/gnu-toolchain/11.3-2022.06-1/aarch64-linux-gnu/gcc-linaro-11.3.1-2022.06-x86_64_aarch64-linux-gnu.tar.xz
#
# https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-arm-none-eabi.tar.xz
# https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf.tar.xz
# https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
# https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz

TOOLCHAIN_SITE_BARE		?= https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel
# TOOLCHAIN_SITE_OS		?= https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel
TOOLCHAIN_SITE_OS		?= https://snapshots.linaro.org/gnu-toolchain/11.3-2022.06-1

## toolcahin bare start ##
TC32_PREFIX_BASE_BARE	?= arm-none-eabi
TC32_BASE_BARE			?= gcc-arm-10.3-2021.07-x86_64-arm-none-eabi
TC32_PKG_BARE			?= $(TC32_BASE_BARE).tar.xz
TC32_URL_BARE			?= $(TOOLCHAIN_SITE_BARE)/$(TC32_PKG_BARE)
TC32_PATH_BARE			?= $(EEL_TC_DIR)/$(TC32_BASE_BARE)


TC64_PREFIX_BASE_BARE	?= aarch64-none-elf
TC64_BASE_BARE			?= gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf
TC64_PKG_BARE			?= $(TC64_BASE_BARE).tar.xz
TC64_URL_BARE			?= $(TOOLCHAIN_SITE_BARE)/$(TC64_PKG_BARE)
TC64_PATH_BARE			?= $(EEL_TC_DIR)/$(TC64_BASE_BARE)
## toolcahin bare end ##

## toolcahin OS start ##
ifneq ($(findstring linaro.org,$(TOOLCHAIN_SITE_OS)),)
TC32_PREFIX_BASE_OS		?= arm-linux-gnueabihf
TC32_BASE_OS			?= gcc-linaro-11.3.1-2022.06-x86_64_arm-linux-gnueabihf
TC32_PKG_OS				?= $(TC32_BASE_OS).tar.xz
TC32_URL_OS				?= $(TOOLCHAIN_SITE_OS)/$(TC32_PREFIX_BASE_OS)/$(TC32_PKG_OS)
TC32_VERSION_OS			?= 11.3.1

TC64_PREFIX_BASE_OS		?= aarch64-linux-gnu
TC64_BASE_OS			?= gcc-linaro-11.3.1-2022.06-x86_64_aarch64-linux-gnu
TC64_PKG_OS				?= $(TC64_BASE_OS).tar.xz
TC64_URL_OS				?= $(TOOLCHAIN_SITE_OS)/$(TC64_PREFIX_BASE_OS)/$(TC64_PKG_OS)
TC64_VERSION_OS			?= 11.3.1
endif

ifneq ($(findstring arm.com,$(TOOLCHAIN_SITE_OS)),)
TC32_PREFIX_BASE_OS		?= arm-none-linux-gnueabihf
TC32_BASE_OS			?= gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf
TC32_PKG_OS				?=  $(TC32_BASE_OS).tar.xz
TC32_URL_OS				?= $(TOOLCHAIN_SITE_OS)/$(TC32_PKG_OS)
TC32_VERSION_OS			?= 10.3

TC64_PREFIX_BASE_OS		?= aaarch64-none-linux-gnu
TC64_BASE_OS			?= gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu
TC64_PKG_OS				?= $(TC64_BASE_OS).tar.xz
TC64_URL_OS				?= $(TOOLCHAIN_SITE_OS)/$(TC64_PKG_OS)
TC64_VERSION_OS			?= 10.3
endif

TC32_PATH_OS			?= $(EEL_TC_DIR)/$(TC32_BASE_OS)

TC64_PATH_OS			?= $(EEL_TC_DIR)/$(TC64_BASE_OS)
## toolcahin OS end ##
